;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; err_mode.asm
;; 
;; 2008-11-7 14:56
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Cal_Mode_Err1:
	call	clear_DispBuf
	movlw	.1
	BRA		Mode_Err_disp

Cal_Mode_Err2:
	call	clear_DispBuf
	movlw	.2
	BRA		Mode_Err_disp
Cal_Mode_Err3:
	call	clear_DispBuf
	movlw	.3
	BRA		Mode_Err_disp

Cal_Mode_Err4:
	call	clear_DispBuf
	movlw	.4
	BRA		Mode_Err_disp

Cal_Mode_Err5:
	call	clear_DispBuf
	movlw	.5
	BRA		Mode_Err_disp
Cal_Mode_Err6:
	call	clear_DispBuf
	movlw	.6
	BRA		Mode_Err_disp
Cal_Mode_Err7:
	call	clear_DispBuf
	movlw	.7
	BRA		Mode_Err_disp
Cal_Mode_Err8:
	call	clear_DispBuf
	movlw	.8
	BRA		Mode_Err_disp

Mode_ErrLowVoltage:
	call	buzz_short50ms
	_bsf	lcd3,3
	bra		Mode_Err_COM
Mode_Err1:
	call	clear_DispBuf
	movlw	.1
	BRA		Mode_Err_disp

Mode_Err2:
	call	clear_DispBuf
	movlw	.2
	BRA		Mode_Err_disp

Mode_Err_disp:
	_call	lcd_num
	_movwf	dl
	_movlf	LCDNUME,chh
	_movlf	LCDNUMR,CH
	_movlf	LCDNUMR,Cl
	CALL	disp_service

Mode_Err_COM:
	_clrf	g_HalfSec_t
	_bsf	key_flag,0
Mode_Err_Loop:
	movlw	D_AtuoPowerOff_T
	_fwsl	g_HalfSec_t
	goto	power_off

	_btfsc	port2,0
	_bcf	key_flag,0
	_btfsc	key_flag,0
	bra		Mode_Err_Loop
	call	delay10ms
	_btfsc	port2,0
	bra		Mode_Err_Loop
	_bsf	key_flag,0
	_clrf	g_HalfSec_t
	goto	power_off

